5 ONERRORGOTO500 10 MODE8:DIM:ERASEa:DIMa(3):a$="a b x1y1":c$=CHR$(5) 20 CLS:PRINT"Distance - y=ax+b,(x1,y1)"; 30 FORi=0 TO3 40 LOCATE0,1:PRINTc$;MID$(a$,1+i*2,(SGN(i-1.5)+1)/2+1);"=";a(i);"?";:INPUT@42;a(i):LOCATE0,0 50 NEXT 60 LOCATE0,1:PRINTc$;"d =";ABS(a(0)*a(2)-a(3)+a(1))/SQR(a(0)^2+1);:w$=INPUT$(1,@):GOTO30 500 IFERR=1 THENCLS:ONERRORGOTO0 510 IFERL=40 THENRESUME40 520 LOCATE0,1:PRINTc$;"not found";:w$=INPUT$(1,@):RESUME20